package com.systemsjr.jrappointment.setting;

import com.systemsjr.jrappointment.setting.vo.SystemSettingVO;
import com.systemsjr.jrappointment.utils.ServiceUtils;
import com.systemsjr.jrlib.richclient.BaseItemDialog;

public class SettingDialog extends BaseItemDialog<SystemSettingVO> {

	public SettingDialog(SystemSettingVO item) {
		super("settingDialog");
		setItem(item);
	}
	
	public SettingDialog() {
		super("settingDialog");
	}

	@Override
	protected boolean itemExists() {
		// TODO Auto-generated method stub
		return false;
	}
	
	@Override
	protected boolean onFinish() {
		getItemForm().commit();
		logger.warn("item is " + getItemForm().getFormObject().toString());
		SystemSettingVO settingVO = getItemForm().getFormObject();
		ServiceUtils.getSettingService().save(settingVO);
		return true;
	}

}
